<style lang="less" scoped src="./classes-approvel.less"></style>
<script src="./classes-approvel.js"></script>
<template>
            <div>
              <div class="main-table" style="font-size: 15px;">
                    <Row align="middle" >
                         <Col span="2">
                            班级名称:
                        </Col>
                        <Col span="4">
                            <Input  v-model="query.name" style="width: 98%"></Input>
                        </Col>
                        <Col span="1">
                        学年:
                        </Col>
                        <Col span="2">
                              <Select v-model="query.year">
                                 <Option value='2016'>2016</Option>
                                <Option value='2017'>2017</Option>
                                <Option value='2018'>2018</Option>
                             </Select>
                        </Col>
                         <Col span="1">
                            学期:
                        </Col>
                        <Col span="2">
                               <Select v-model="query.classSeason">
                                      <Option v-for="item in classSeasonList" :value="item.id">{{item.name}}</Option>  
                             </Select>
                        </Col>
                    </Row>
                    <Row align="middle" style="margin-top: 10px;">
                         <Col span="2">
                            所在区域:
                        </Col>
                        <Col span="4">
                            <Select v-model="query.areaId">
                                       <Option v-for="item in areaList" :value="item.id" :key="item.id">{{item.name}}</Option>  
                             </Select>
                        </Col>
                        <Col span="1">
                        部门:
                        </Col>
                        <Col span="2">
                        <Input v-model="query.departmentName"  :readonly="true"   @on-click="deptModal = true" icon="search"></Input>
                        </Col>
                         <Col span="1">
                            专业大类:
                        </Col>
                        <Col span="2">
                              <Select v-model="query.marjorId">
                                      <Option v-for="item in marjorFatherList" :value="item.id" >{{item.name}}</Option>  
                             </Select>
                        </Col>
                    </Row>
                </div>
                <div style="display: flex;justify-content:space-between;margin-top: 10px;">
                     <div>
                    <span @click="doApproveBath"><Button type="primary" icon="clipboard">批量核审</Button></span>
                    <span @click="doUnApproveBath"><Button type="error" icon="clipboard">批量退回</Button></span>
                 </div>
                <div>
                    <span @click="doQuery"><Button type="primary" icon="android-search">查询</Button></span>
                     <span @click="query={};doQuery();"><Button type="primary" icon="refresh">重置</Button></span>
                </div>
                </div> 
        <div class="main-table">
            <Table border  :columns="columns" :data="dataList" :highlight-row="true" @on-selection-change="whenSelectRow"></Table>
        </div>
        <div class="pagination">
            <Page border :total="total" size="small" :page-size="pageSize" :current.sync="pageIndex" @on-change="init" show-total show-elevator></Page>
        </div>
                <Modal v-model="deptModal"
                       title="部门列表"
                       width="20%"
                       :mask-closable="false">
                    <custom-tree ref="dept"
                                 url="/base/organize/findOrgAll"
                                 :formData="{'orgid': baseuser.orgId}"
                                 :showCheckbox="false"></custom-tree>
                    <div slot="footer">
                        <Button type="primary" @click="setDept">确认</Button>
                        <Button type="error" style="margin-left: 8px" @click="cancelSelect">清空</Button>
                    </div>
                </Modal>
    </div>
</template>

